name: Test TensorSensor

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        python-version: [3.9]

    steps:
    - uses: actions/checkout@v2
    - name: Set up python 3
      uses: actions/setup-python@v2
      with:
        python-version: '3.9'
    - name: Install dependencies
      run: |
          python -m pip install --upgrade pip
          pip install pyparsing==2.4.7
          pip install torch
          python setup.py install

    - name: Test with pytest
      run: |
        pip install pytest
        pytest testing/test_incr_eval.py 
        pytest testing/test_invalid_stat.py 
        pytest testing/test_parser.py 
        pytest testing/test_tree_eval.py 
